package com.itheima.Test;

import java.util.Objects;

public class Student001 {
    //Student应该具有姓名、性别、年龄和学号四个属性；
    private String name ;
    private String xes;
    private int age ;
    private int id;

    public Student001() {
    }

    public Student001(String name, String xes, int age, int id) {
        this.name = name;
        this.xes = xes;
        this.age = age;
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getXes() {
        return xes;
    }

    public void setXes(String xes) {
        this.xes = xes;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    @Override
    public String toString() {
        return "Student001{" +
                "name='" + name + '\'' +
                ", xes='" + xes + '\'' +
                ", age=" + age +
                ", id=" + id +
                '}';
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        Student001 that = (Student001) o;
        return age == that.age &&
                id == that.id &&
                Objects.equals(name, that.name) &&
                Objects.equals(xes, that.xes);
    }

    @Override
    public int hashCode() {
        return Objects.hash(name, xes, age, id);
    }
}

